//
//  UserInfoHeaderView.swift
//  JTYP
//
//  Created by Groot on 2017/12/8.
//  Copyright © 2017年 inspur. All rights reserved.
//

class UserInfoHeaderView: UICollectionReusableView {
    
    static let CellIdentifier = String(describing: UserInfoHeaderView.self)
    
    @IBOutlet weak var portraitView: UIImageView!
    @IBOutlet weak var nickNameLb: UILabel!
    
    override func awakeFromNib() {
        portraitView.clipsToBounds = true
    }
    
    override func layoutSubviews() {
        super.layoutSubviews()
        portraitView.layer.cornerRadius = portraitView.bounds.height / 2.0
    }
    
    func setData(userInfo: CUser?) {
        
        portraitView.yy_setImage(with: URL.init(string: userInfo?.userInfo?.photourl ?? ""), placeholder: UIImage.init(named: "my_tx"))
        nickNameLb.text = userInfo?.shiroUser?.name
    }
}
